package com.maiji.cloud.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.maiji.cloud.entities.shopingmall.ShopingOrder;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.maiji.cloud.request.shopingmall.OrderFindAllReqData;
import com.maiji.cloud.response.shopingmall.ShopingOrderResData;
import com.maiji.cloud.response.shopingmall.ShopingOrderStatusCountResData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ShopingOrderMapper extends BaseMapper<ShopingOrder> {

    ShopingOrderResData findOrderById (@Param("orderId") String orderId, @Param("refundStatus") Integer refundStatus);

    List<ShopingOrderResData> findAllOrder(@Param("data") OrderFindAllReqData data, @Param("token") String token, Page page);

    /**
     * 修改订单状态
     * @param orderNo
     * @param status
     */
    void updateByOrderNo(@Param("orderNo")String orderNo,@Param("status")Integer status);

    List<ShopingOrderStatusCountResData> findAllShopingOrderStatusCount(@Param("isRefund") Boolean isRefund, @Param("userId") String userId);

}
